<script setup lang="ts">
import {computed, type PropType} from "vue";
import {ChatType} from '@/views/ai/agent/x6/api/blue-print-api'
import {com} from './data'
const props=defineProps({
  chat:Object as PropType<ChatType>,
})
const c = computed(()=>{
  if (props.chat&&props.chat.component){
    return com[props.chat.component]
  }
  return undefined
})
</script>

<template>
  <div v-if="c" style="width:100%">
    <component style="width: 100%" :is="c" :chat="chat" />
  </div>
</template>

<style scoped lang="scss">

</style>
